<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>购物车列表</title>
    <link rel="stylesheet" href="static/css/style.css">
</head>
<body>
<div class="导航0">
    <div class="导航1">
        <div class="导航2">
            <a th:href="@{/toIndex}" th:if="${username}!=null">胖墩服装店首页</a>
            <a th:href="@{/}" th:if="${username}==null">胖墩服装店首页</a><span>|</span>
            <a href="">待用</a><span>|</span>
            <a href="">待用</a><span>|</span>
            <a href="">待用</a><span>|</span>
            <a href="">待用</a><span>|</span>
            <a href="">待用</a><span>|</span>
        </div>
        <div class="导航3">
            <a th:href="@{/toLogin}" th:if="${username}==null">登录/注册</a>
            <a th:href="@{/input}" th:if="${username}!=null" th:text="'尊敬的'+${username}+'你好'"></a><span>|</span>
            <a href="/logout">注销</a>
        </div>
        <div class="导航4"><a href="/input">开始购物<span>(0)</span></a></div>
    </div>
</div>
<form method="get" th:action="@{/addClothesToCart}">
    <input type="hidden" name = "userId" value="1"/>
    <input type="text" name = "clothesId" placeholder="请输入衣服id"/><br/>
    <input type="text" name="num" placeholder="商品数量"/><br/>
    <input type="submit" value="确定"/>
</form>
购物清单
<table>
    <tr>
        <th>服装Id</th>
        <th>数量</th>
        <th>单位价格</th>
        <th>实际单位价格</th>
        <th>总价格</th>
        <th>实际价格</th>
    </tr>
    <tr th:each="oc:${ocList}">
        <td th:text="${oc.getClothesId()}">orderId</td>
        <td th:text="${oc.getNum()}">num</td>
        <td th:text="${oc.getUnitPrice()}"/>
        <td th:text="${oc.getUnitActualPrice()}"/>
        <td th:text="${oc.getTotalPrice()}">totalPrice</td>
        <td th:text="${oc.getActualTotalPrice()}">actualPrice</td>
    </tr>
</table>
<form method="get" th:action="@{createOrder}">
    <input type="hidden" name="userId" th:value="${userId}" \>
    <input type="submit" value="生成订单"\>
</form>
</body>
</html>